
use chrono::{DateTime, Utc};

#[derive(sqlx::FromRow, Debug, Clone)]
pub struct Worker {
    pub worker_id: String,
    pub worker_host: String,
    pub miner_name: String,
    pub worker_enable: i32,
    pub accept_new: i32,
    pub update_time: DateTime<Utc>,
}

#[derive(sqlx::FromRow, Debug, Clone)]
pub struct SealTask {
    pub task_id: String,
    pub task_type: String,
    pub worker_host: String,
    pub miner_actor: i32,
    pub sector_number: i32,
    pub assign_time: DateTime<Utc>,
    pub receive_time: Option<DateTime<Utc>>,
    pub complete_time: Option<DateTime<Utc>>,
    pub task_status: i32,
}

#[derive(sqlx::FromRow, Debug, Clone)]
pub struct WorkerConfig {
    pub worker_host: String,
    pub task_type: String,
    pub task_limit: i32,
}

